import 'package:flutter/material.dart';

class NotifyItem extends StatefulWidget {
  NotifyItem({Key? key, required this.item}) : super(key: key);
  final Map item;

  @override
  _NotifyItemState createState() => _NotifyItemState();
}

class _NotifyItemState extends State<NotifyItem> {
  @override
  Widget build(BuildContext context) {
    return Container(
      margin: const EdgeInsets.all(10),
      padding: const EdgeInsets.all(10),
      decoration: BoxDecoration(
          color: Color(0xFFFF), borderRadius: BorderRadius.circular(10)),
      child: Column(
        crossAxisAlignment: CrossAxisAlignment.start,
        children: [
          Text(
            widget.item["title"],
            textAlign: TextAlign.left,
            style: const TextStyle(
                fontWeight: FontWeight.bold,
                color: Color(0xFF000000),
                fontSize: 18),
          ),
          const SizedBox(
            height: 10,
          ),
          Text(
            widget.item["content"],
            textAlign: TextAlign.left,
            style: const TextStyle(
              color: Color(0xFF666666),
              fontSize: 16,
            ),
          ),
          const SizedBox(
            height: 10,
          ),
          Text(
            widget.item["createAt"],
            textAlign: TextAlign.left,
            style: const TextStyle(color: Color(0xFFCCCCCC), fontSize: 14),
          )
        ],
      ),
    );
  }
}
